const mongoose = require('../db');
const Schema = mongoose.Schema;

const schema = new Schema({
  commentid: { type: String },
  productid: { type: String },
  orderid: { type: String },
  userid: { type: String },
  avatar: { type: String },
  comment: { type: String },
  score: { type: String },
  date: { type: String },
  imgs: { type: Array }
})

// 生成一个集合 集合名称为 comments
module.exports = mongoose.model('Comment', schema);